package cn.edu.sasu.mapper;


import cn.edu.sasu.domain.dto.ChangDocDTO;
import cn.edu.sasu.domain.dto.PatientSearchDTO;
import cn.edu.sasu.domain.entity.Doctor;
import cn.edu.sasu.domain.entity.Patient;
import cn.edu.sasu.domain.entity.PatientEducationActivity;
import cn.edu.sasu.domain.vo.AdressAndCountVO;
import cn.edu.sasu.domain.vo.PatientVO;
import cn.edu.sasu.domain.vo.SysRoleVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PatientMapper {
    Integer save(@Param("patient") Patient patient);

    List<PatientVO> findPatientList(@Param("deleteFlagYes") Integer deleteFlagYes,@Param("offset") Integer offset,@Param("rows") Integer rows);

    Integer countPatient(Integer deleteFlagYes);

    Patient findPatientByName(String patientName);

    Integer updatePatientDeleteFlagByUserIds(@Param("patientIds") List<Integer> patientIds,@Param("deleteFlagYes")  Integer deleteFlagYes);

    List<Doctor> getDoctor();

    Integer update(@Param("patient") PatientVO patient);

    Integer changD(@Param("changDocDTO")ChangDocDTO changDocDTO);

    List<PatientVO> searchPatientList(@Param("deleteFlagYes") Integer deleteFlagYes, @Param("offset") Integer offset, @Param("rows")Integer rows, @Param("patientSearchDTO") PatientSearchDTO patientSearchDTO);

    Integer countSearchPatient(@Param("deleteFlagYes")Integer deleteFlagYes, @Param("patientSearchDTO")PatientSearchDTO patientSearchDTO);

    List<AdressAndCountVO> getCount();

    List<PatientVO> activityListPatient(Integer deleteFlagYes, Integer offset, Integer rows, Integer doctorId);

    Integer countActivitiesPatient(Integer deleteFlagYes, Integer doctorId);

    List<Patient> findAll();
}
